<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>p3_CSS常用值</title>
    <style>
        h1 {
            /**rgb表示法*/
            color: rgb(255, 0, 0);
            color: rgb(0,255,255);
            color: rgb(255,255,255);
            color: rgb(0,0,0);
            color: rgb(255,255,0);
            color: rgb(0,0,255);
            /**16进制表示法*/
            color: #ff0000;
            color: #00ffff;
            color: #ffffff;
            color: #000000;
            color: #ffff00;
            color: #0000ff;
            /*16进制简写:两位一致的才可以简写*/
            color: #f00;
            color: #0f0;
            /* rgba表示法:[0,1]*/
            color: rgba(255,0,0,0);
            color: rgba(255,0,0,0.5);
            color: rgba(255,0,0,.1);
            color: rgba(255,0,0,1);

        }
        .d1{
            /**背景图片区域大小*/
            width: 50px;
            height: 100px;
            background-image: url("img/mr.png");
            /**背景图片大小*/
            background-size: 50px 100px;
            /**背景色*/
            background-color: black;

        }
        .d2{
            width: 500px;
            height: 500px;
            border: red solid 5px;
            background-image: url("img/mr.png");
            /*background-size: 500px 500px;*/
            /**背景图不允许重复*/
            background-repeat: no-repeat;
            background-position: 0 0;/**默认位置为左上角 原点*/
            background-position: -50px 0;/**向左*/
            background-position: 50px 0;/**向右*/
            background-position: 0 -50px;/**向上*/
            background-position: 0 50px;/**向下*/
            background-position: 50% 50%;/**居中*/
            background-position: 100% 100%;/**居中*/
            background-position: left top;/**居中*/
            background-position: right bottom;/**居中*/


        }
        .d3{
            width: 50px;
            height: 50px;
            background-image: linear-gradient(30deg,red,orange,yellow,green,blue,purple);
        }
    </style>
</head>
<body>
    <h1>测试颜色</h1>
<!--   .d*3补齐  -->

    <div class="d1"></div>
    <div class="d2"></div>
    <div class="d3"></div>

</body>
</html>